Optimal. Leaf size=114 \[ \frac {\sqrt {b} (3 a+5 b) \text {ArcTan}\left (\frac {\sqrt {a} \cosh (c+d x)}{\sqrt {b}}\right )}{2 a^{7/2} d}-\frac {(a+2 b) \cosh (c+d x)}{a^3 d}+\frac {\cosh ^3(c+d x)}{3 a^2 d}-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (b+a \cosh ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4218, 466,
1167, 211} \begin {gather*} \frac {\sqrt {b} (3 a+5 b) \text {ArcTan}\left (\frac {\sqrt {a} \cosh (c+d x)}{\sqrt {b}}\right )}{2 a^{7/2} d}-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (a \cosh ^2(c+d x)+b\right )}-\frac {(a+2 b) \cosh (c+d x)}{a^3 d}+\frac {\cosh ^3(c+d x)}{3 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 466
Rule 1167
Rule 4218
Rubi steps
\begin {align*} \int \frac {\sinh ^3(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^2} \, dx &=-\frac {\text {Subst}\left (\int \frac {x^4 \left (1-x^2\right )}{\left (b+a x^2\right )^2} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (b+a \cosh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {b (a+b)-2 a (a+b) x^2+2 a^2 x^4}{b+a x^2} \, dx,x,\cosh (c+d x)\right )}{2 a^3 d}\\ &=-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (b+a \cosh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \left (-2 (a+2 b)+2 a x^2+\frac {3 a b+5 b^2}{b+a x^2}\right ) \, dx,x,\cosh (c+d x)\right )}{2 a^3 d}\\ &=-\frac {(a+2 b) \cosh (c+d x)}{a^3 d}+\frac {\cosh ^3(c+d x)}{3 a^2 d}-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (b+a \cosh ^2(c+d x)\right )}+\frac {(b (3 a+5 b)) \text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cosh (c+d x)\right )}{2 a^3 d}\\ &=\frac {\sqrt {b} (3 a+5 b) \tan ^{-1}\left (\frac {\sqrt {a} \cosh (c+d x)}{\sqrt {b}}\right )}{2 a^{7/2} d}-\frac {(a+2 b) \cosh (c+d x)}{a^3 d}+\frac {\cosh ^3(c+d x)}{3 a^2 d}-\frac {b (a+b) \cosh (c+d x)}{2 a^3 d \left (b+a \cosh ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 3.36, size = 861, normalized size = 7.55 \begin {gather*} \frac {(a+2 b+a \cosh (2 (c+d x)))^2 \text {sech}^4(c+d x) \left (\frac {9 a^3 \text {ArcTan}\left (\frac {\left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}+576 a \sqrt {b} \text {ArcTan}\left (\frac {\left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )+960 b^{3/2} \text {ArcTan}\left (\frac {\left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}-i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )+\frac {9 a^3 \text {ArcTan}\left (\frac {\left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}+576 a \sqrt {b} \text {ArcTan}\left (\frac {\left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )+960 b^{3/2} \text {ArcTan}\left (\frac {\left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2}\right ) \sinh (c) \tanh \left (\frac {d x}{2}\right )+\cosh (c) \left (\sqrt {a}+i \sqrt {a+b} \sqrt {(\cosh (c)-\sinh (c))^2} \tanh \left (\frac {d x}{2}\right )\right )}{\sqrt {b}}\right )-\frac {9 a^3 \text {ArcTan}\left (\frac {\sqrt {a}-i \sqrt {a+b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {9 a^3 \text {ArcTan}\left (\frac {\sqrt {a}+i \sqrt {a+b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-96 \sqrt {a} (3 a+8 b) \cosh (c) \cosh (d x)+32 a^{3/2} \cosh (3 c) \cosh (3 d x)-\frac {384 a^{3/2} b \cosh (c+d x)}{a+2 b+a \cosh (2 (c+d x))}-\frac {384 \sqrt {a} b^2 \cosh (c+d x)}{a+2 b+a \cosh (2 (c+d x))}-288 a^{3/2} \sinh (c) \sinh (d x)-768 \sqrt {a} b \sinh (c) \sinh (d x)+32 a^{3/2} \sinh (3 c) \sinh (3 d x)\right )}{1536 a^{7/2} d \left (a+b \text {sech}^2(c+d x)\right )^2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(263\) vs.
\(2(100)=200\).
time = 2.25, size = 264, normalized size = 2.32
method | result | size |
derivativedivides | \(\frac {-\frac {1}{3 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{2 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-a -4 b}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {4 b \left (\frac {\left (-\frac {a}{4}+\frac {b}{4}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a}{4}-\frac {b}{4}}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}+\frac {\left (3 a +5 b \right ) \arctan \left (\frac {2 \left (a +b \right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a -2 b}{4 \sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}+\frac {1}{3 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{2 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {a +4 b}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(264\) |
default | \(\frac {-\frac {1}{3 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{2 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-a -4 b}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {4 b \left (\frac {\left (-\frac {a}{4}+\frac {b}{4}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a}{4}-\frac {b}{4}}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}+\frac {\left (3 a +5 b \right ) \arctan \left (\frac {2 \left (a +b \right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a -2 b}{4 \sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}+\frac {1}{3 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{2 a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {a +4 b}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(264\) |
risch | \(\frac {{\mathrm e}^{3 d x +3 c}}{24 a^{2} d}-\frac {3 \,{\mathrm e}^{d x +c}}{8 a^{2} d}-\frac {{\mathrm e}^{d x +c} b}{a^{3} d}-\frac {3 \,{\mathrm e}^{-d x -c}}{8 a^{2} d}-\frac {{\mathrm e}^{-d x -c} b}{a^{3} d}+\frac {{\mathrm e}^{-3 d x -3 c}}{24 a^{2} d}-\frac {b \left (a +b \right ) {\mathrm e}^{d x +c} \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a^{3} d \left (a \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+a \right )}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}\, {\mathrm e}^{d x +c}}{a}+1\right )}{4 a^{3} d}+\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}\, {\mathrm e}^{d x +c}}{a}+1\right ) b}{4 a^{4} d}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}\, {\mathrm e}^{d x +c}}{a}+1\right )}{4 a^{3} d}-\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}\, {\mathrm e}^{d x +c}}{a}+1\right ) b}{4 a^{4} d}\) | \(342\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 2021 vs.
\(2 (100) = 200\).
time = 0.39, size = 3804, normalized size = 33.37 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sinh ^{3}{\left (c + d x \right )}}{\left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {cosh}\left (c+d\,x\right )}^4\,{\mathrm {sinh}\left (c+d\,x\right )}^3}{{\left (a\,{\mathrm {cosh}\left (c+d\,x\right )}^2+b\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________